<?php
$dbHost = "localhost";        //Location Of Database usually its localhost 
$dbUser = "root";            //Database User Name 
$dbPass = "";                                       //Database Password 
$dbDatabase_mayphatdien = "nhadat_phatdien";       //Database Name 
$dbDatabase_mpdgiare = "nhadat_mayphatdiengiare.vn";       //Database Name 


//connect to nhadat_phatdien
global $connect_mayphatdien, $connect_mptgiare;

$connect_mayphatdien = mysql_connect($dbHost, $dbUser, $dbPass) or die ("Error connecting to nhadat_phatdien database."); 
mysql_select_db($dbDatabase_mayphatdien, $connect_mayphatdien) or die ("Couldn't select the database.");
mysql_query ("SET NAMES 'utf8'", $connect_mayphatdien); 


//conect to nhadat_mayphatdiengiare.vn
$connect_mptgiare = mysql_connect($dbHost, $dbUser, $dbPass,true) or die ("Error connecting to nhadat_mayphatdiengiare.vn database."); 
mysql_select_db($dbDatabase_mpdgiare, $connect_mptgiare) or die ("Couldn't select the database."); 
mysql_query ("SET NAMES 'utf8'", $connect_mptgiare);

